package com.sa.ibiz.demo.demoapp.controller;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sa.ibiz.demo.ibizutil.domain.ActionResult;
import com.sa.ibiz.demo.ibizutil.domain.CodeList;
import com.sa.ibiz.demo.ibizutil.errors.BadRequestAlertException;
import org.springframework.validation.annotation.Validated;
import org.springframework.http.ResponseEntity;

@RestController
@RequestMapping("/demoapp/app/codelist")
public class DemoAppCodeListController{

	@Resource(name="WorkflowMob_SysOperatorCodeList")
	private com.sa.ibiz.demo.demo.codelist.SysOperatorCodeList workflowMob_SysOperatorCodeList;


	@Resource(name="WorkflowMob_YesNoCodeList")
	private com.sa.ibiz.demo.demo.codelist.YesNoCodeList workflowMob_YesNoCodeList;


	@Resource(name="WorkflowMob_CodeList56CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList56CodeList workflowMob_CodeList56CodeList;


	@Resource(name="WorkflowMob_URDSecDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDSecDRCodeList workflowMob_URDSecDRCodeList;


	@Resource(name="WorkflowMob_URDOrgDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDOrgDRCodeList workflowMob_URDOrgDRCodeList;


	@Resource(name="WorkflowMob_URDUserDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDUserDRCodeList workflowMob_URDUserDRCodeList;


	@Resource(name="WorkflowMob_URDBCDRCodeList")
	private com.sa.ibiz.demo.demo.codelist.URDBCDRCodeList workflowMob_URDBCDRCodeList;


	@Resource(name="WorkflowMob_CodeList58CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList58CodeList workflowMob_CodeList58CodeList;


	@Resource(name="WorkflowMob_UserRoleTypeCodeList")
	private com.sa.ibiz.demo.demo.codelist.UserRoleTypeCodeList workflowMob_UserRoleTypeCodeList;


	@Resource(name="WorkflowMob_CodeList16CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList16CodeList workflowMob_CodeList16CodeList;


	@Resource(name="WorkflowMob_CodeList59CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList59CodeList workflowMob_CodeList59CodeList;


	@Resource(name="WorkflowMob_CodeList5CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList5CodeList workflowMob_CodeList5CodeList;



	@RequestMapping("workflowmob/sysoperator")
    public ResponseEntity<CodeList> getWorkflowMob_SysOperatorCodeList(){
    	return ResponseEntity.ok().body(workflowMob_SysOperatorCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/yesno")
    public ResponseEntity<CodeList> getWorkflowMob_YesNoCodeList(){
    	return ResponseEntity.ok().body(workflowMob_YesNoCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist56")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList56CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList56CodeList.getCodeList());
	}
	@RequestMapping("workflowmob/urdsecdr")
    public ResponseEntity<CodeList> getWorkflowMob_URDSecDRCodeList(){
    	return ResponseEntity.ok().body(workflowMob_URDSecDRCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/urdorgdr")
    public ResponseEntity<CodeList> getWorkflowMob_URDOrgDRCodeList(){
    	return ResponseEntity.ok().body(workflowMob_URDOrgDRCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/urduserdr")
    public ResponseEntity<CodeList> getWorkflowMob_URDUserDRCodeList(){
    	return ResponseEntity.ok().body(workflowMob_URDUserDRCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/urdbcdr")
    public ResponseEntity<CodeList> getWorkflowMob_URDBCDRCodeList(){
    	return ResponseEntity.ok().body(workflowMob_URDBCDRCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist58")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList58CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList58CodeList.getCodeList());
	}
	@RequestMapping("workflowmob/userroletype")
    public ResponseEntity<CodeList> getWorkflowMob_UserRoleTypeCodeList(){
    	return ResponseEntity.ok().body(workflowMob_UserRoleTypeCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist16")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList16CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList16CodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist59")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList59CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList59CodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist5")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList5CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList5CodeList.getCodeList());
	}

	@RequestMapping("getall")
    public ResponseEntity<List<CodeList>> getAll(){
     List<CodeList> list = new ArrayList<CodeList>();
    list.add(workflowMob_SysOperatorCodeList.getCodeList());
    list.add(workflowMob_YesNoCodeList.getCodeList());
    list.add(workflowMob_CodeList56CodeList.getCodeList());
    list.add(workflowMob_URDSecDRCodeList.getCodeList());
    list.add(workflowMob_URDOrgDRCodeList.getCodeList());
    list.add(workflowMob_URDUserDRCodeList.getCodeList());
    list.add(workflowMob_URDBCDRCodeList.getCodeList());
    list.add(workflowMob_CodeList58CodeList.getCodeList());
    list.add(workflowMob_UserRoleTypeCodeList.getCodeList());
    list.add(workflowMob_CodeList16CodeList.getCodeList());
    list.add(workflowMob_CodeList59CodeList.getCodeList());
    list.add(workflowMob_CodeList5CodeList.getCodeList());
    	return ResponseEntity.ok().body(list);
	}
}